package com.skydonkey.service;

import com.github.pagehelper.Page;
import com.qiniu.common.QiniuException;
import com.skydonkey.pojo.po.Category;
import com.skydonkey.pojo.po.VideoInfo;
import com.skydonkey.pojo.po.VideosWatchTimes;
import com.skydonkey.pojo.vo.*;
import org.opencv.video.Video;

import java.util.List;

public interface VideoService {
    List<Category> getAllCategories();

    Result<VideoPublishResp> publishVideo(VideoPublishReq req) throws QiniuException;
    DeleteVideoPublishedResp deletePublishedVideo(DeleteVideoPublishedReq req);

    Page<VideoInfo> findAll(int pageNum, int pageSize);
    VideoInfo getVideoInfoByVid(Long videoID);
    Page<VideoInfo> findAllByUid(Long uid, int pageNum, int pageSize);
    QueryPublishedVideoResp getPublishedVideo(QueryPublishedVideoReq req);

    Page<VideoInfo> findVideoInfoByCategoryId(Integer categoryId, Integer pageNum, Integer pageSize);
    Page<VideoInfo> getMostLikedVideoInfo(Integer pageNum, Integer pageSize);


    int addVideoMyFavoriteVideo(AddVideoMyFavReq req);
    int deleteVideoMyFavorite(DeleteVideoMyFavReq req);
    Long getVideoMyFavoriteCount(Long videoId);
    GetVideoMyFavResp getFavoriteVideos(GetVideoMyFavReq req);

    int addVideoMyLiked(AddVideoMyLikedReq req);
    int deleteVideoMyLiked(DeleteVideoMyLikedReq req);
    Long getVideoMyLikedCount(Long videoId);
    GetVideoMyLikedDetailsResp getVideoMyLikedDetails(GetVideoMyLikedDetailsReq req);

    UpdatePermissionResp updateVideoPermission(UpdatePermissionReq req);
    int addVideoWatchHistory(AddVideoWatchHistoryReq req);
    int deleteVideoWatchHistory(DeleteVideoWatchHistoryReq req);
    GetVideoHistoryListResp getVideoWatchHistory(GetVideoHistoryListReq req);

    VideosWatchTimes getVideoWatchTimes(Long videoId);
    Long addVideoWatchTimes(Long videoId);

    VideoDetailsResp getVideoDetail(Long videoId);
    VideoDetailsResp getVideoDetailWithUserLikedFav(Long uid, Long videoId);


    GetRecommendVideoDetailsResp getRecommendVideoDetail(Integer pageNum, Integer pageSize);

    GetVideoSamplesResp getVideoSamples(GetVideoSamplesReq req);

    CreateVideoCommentResp createComment(CreateVideoCommentReq req);

    GetVideoCommentResp getComment(GetVideoCommentReq req);

    SearchVideoResp searchVideoIdByTitle(SearchVideoReq req);


}
